package com.snjx.admui.master.entity;

import java.util.Date;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.FieldDefaults;

/**
* @author zyl
* @date 2017年6月8日 
* @describe
*/
@Getter
@Setter
@FieldDefaults(level=AccessLevel.PRIVATE)
public class MasterEntity {
	String uid;
    @NotEmpty(message = "用户id不能为空")
    String userId;
    @NotEmpty(message = "用户名不能为空")
    @Length(min = 5, max = 20, message = "用户名长度必须位于5到20之间")
    String userName;
    @NotEmpty(message = "密码不能为空")
    @Size(min=6, max=20, message="密码长度只能在6-20之间")
    String userPwd;
    @NotEmpty(message = "用户权限id不能为空")
    String roleId;
    @Email(message = "请输入正确的邮箱")
    String userEmail;
    @Max(value = 100, message = "年龄不能大于100岁")
    @Min(value= 10 ,message= "必须年满10岁！" )
    int userAge;
    Date createTime;
    Date updateTime;
}
